package com.sdyc.ndmp.cls.protocol;


import com.sdyc.ndmp.cls.dtd.DataSentence;
import com.sdyc.ndmp.cls.dtd.KeywordCondition;

import java.util.Map;

/**
 * <pre>
 *
 * Created by zhenqin.
 * User: zhenqin
 * Date: 16/3/3
 * Time: 13:55
 * Verdor: NowledgeData
 * To change this template use File | Settings | File Templates.
 *
 * </pre>
 *
 * @author zhenqin
 */
public interface SentenceKeywordProtocol {


    /**
     * 初始化, 需要把关键词过滤的信息传递过来, 完成初始化
     */
    public void setUp(KeywordCondition condition);



    /**
     *
     * 把每一条 Post 精简为 PostSentence, 到 CLS 过滤
     *
     * @param sentence
     * @return
     */
    public Map<String, Object> send(DataSentence sentence);


    /**
     * client 使用完成, 调用 close 结束
     */
    public void close();


}
